'use strict';
//model level
class examList {
	constructor() {
		this.table = "exam";
	}

	list(db, callback) {
		let collection = db.collection(this.table);
		collection.find().toArray((err, result) => {
			if(err) {
				console.log("Error:" + err);
				callback(error);
				return;
			}
			callback(result);
		});
	}
}

module.exports = new examList();